#!/usr/bin/python3
# -*- coding: utf-8; tab-width: 4; indent-tabs-mode: t -*-


class Storage:

    @staticmethod
    def get_properties():
        return {}

    def __init__(self, param):
        self._mirrorSiteDict = dict()

    def dispose(self):
        pass

    def add_mirror_site(self, mirror_site_id, mirror_site_properties):
        assert mirror_site_id not in self._mirrorSiteDict
        self._mirrorSiteDict[mirror_site_id] = mirror_site_properties

    def remove_mirror_site(self, mirror_site_id):
        assert mirror_site_id in self._mirrorSiteDict
        del self._mirrorSiteDict[mirror_site_id]

    def get_param_for_updater(self, mirror_site_id):
        assert mirror_site_id in self._mirrorSiteDict
        return {
            "data-directory": self._mirrorSiteDict[mirror_site_id]["data-directory"],
        }

    def get_param_for_advertiser(self, mirror_site_id):
        assert mirror_site_id in self._mirrorSiteDict
        return {
            "data-directory": self._mirrorSiteDict[mirror_site_id]["data-directory"],
        }
